package com.keya.features.tool;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.HashMap;
import java.util.Map;


/**
 * @author : xf.he
 * @version : 1.0 2023/11/2
 * @since : 1.0
 **/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class DicomFindParamsBuilder {

    public static Map<String, String> byStudyInstanceUID(String studyInstanceUID) {
        Map<String, String> map = initMap();
        map.put("StudyInstanceUID", studyInstanceUID);
        return map;
    }

    public static Map<String, String> byAccessionNumber(String accessionNumber) {
        Map<String, String> map = initMap();
        map.put("AccessionNumber", accessionNumber);
        return map;
    }

    public static Map<String, String> byStudyDate(String studyDate) {
        Map<String, String> map = initMap();
        map.put("StudyDate", studyDate);
        return map;
    }

    public static Map<String, String> byModality(String modality) {
        Map<String, String> map = initMap();
        map.put("Modality", modality);
        return map;
    }

    public static Map<String, String> initMap() {
        Map<String, String> map = new HashMap<>();
        map.put("AccessionNumber", "");
        map.put("PatientID", "");
        map.put("PatientName", "");
        map.put("PatientSex", "");
        map.put("PatientBirthDate", "");
        map.put("RetrieveAETitle", "");
        map.put("SpecificCharacterSet", "");
        map.put("StudyDate", "");
        map.put("StudyInstanceUID", "");
        map.put("SeriesInstanceUID", "");
        map.put("SeriesDescription", "");
        map.put("SeriesNumber", "");
        map.put("SliceThickness", "");
        map.put("BodyPartExamined", "");
        map.put("StudyDescription", "");
        map.put("StudyTime", "");
        return map;
    }

}
